home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Data 2002 May / CD Rom Data Mayıs 2002.iso / Freeware / Blitz Basic / data1.cab / Support / help / samples / readdir.bb < prev    next >
Encoding:
Text File  |  2002-04-10  |  301 b   |  17 lines

  1.  
  2. dir=ReadDir( CurrentDir$() )
  3. Print "Directory of "+CurrentDir$()
  4. Repeat
  5.     f$=NextFile$( dir )
  6.     If f$="" Then Exit
  7.     t=FileType( f$ )
  8.     f$=LSet$( f$,32 )
  9.     If t=1            ;it's a file!
  10.         Print f$+" ("+FileSize( f$ )+")"
  11.     Else If t=2    ;it's a dir!
  12.         Print f$+" (DIR)"
  13.     EndIf
  14. Forever
  15. CloseDir dir
  16.  
  17.